Crate retry_after

source ·
Expand description

A Retry-After header implementation for Hyper

This crate’s repo is located at https://github.com/jwilm/retry-after.

§Examples

use std::time::{Duration, SystemTime};
use retry_after::RetryAfter;

// Create a RetryAfter::Delay header
let retry_after_delay = RetryAfter::Delay(Duration::from_secs(300));

// Create a RetryAfter::DateTime header
let retry_after_dt = RetryAfter::DateTime(SystemTime::now() + Duration::from_secs(300));

For more examples, please see the examples directory at the crate root.

Enums§

Constants§